package com.github.operationlog;

import lombok.Data;
import lombok.ToString;

/**
 * 变更实体类字段值
 *
 * @author luke.luo
 */
@Data
@ToString
public class EntityValue {
    /**
     * 字段名
     */
    private String name;

    /**
     * 字段说明
     */
    private String note;

    /**
     * 旧字段值
     */
    private Object oldVal;

    /**
     * 新字段值
     */
    private Object newVal;

    public EntityValue(String name, String oldVal, String newVal) {
        this.name = name;
        this.oldVal = oldVal;
        this.newVal = newVal;
    }

    public EntityValue(String name, String note, Object oldVal, Object newVal) {
        this.name = name;
        this.note = note;
        this.oldVal = oldVal;
        this.newVal = newVal;
    }
}
